<script setup>
// 引入ref
import { ref } from 'vue';
// 定义加减
const count = ref(100)
const cut = () => count.value--
const add = () => count.value++

</script>

<template>
  <div>
    <button @click="cut">-</button>
    <span>{{ count }}</span>
    <button @click="add">+</button>
  </div>
</template>

<style scoped></style>